package com.lavender.extention.extention_interface;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;


/**
 * <p>
 * ApplicationContextInitializer
 * 一：作用：
 *  在ConfigurableApplicationContext类型(或者子类型)的ApplicationContext做refresh之前，允许我们对ConfigurableApplicationContext的实例做进一步的设置和处理。
 *
 * 二：使用方式：
 * 1：springApplication.addInitializers添加初始化
 * SpringApplication springApplication =  new SpringApplication(LavenderExtentionApplication.class);
 * springApplication.addInitializers(new ApplicationContextInitializerTest());
 * springApplication.run(args);
 *
 * 2：使用spring.factories加载
 * 参考：spring.factories第5行。
 * </p>
 *
 * @author: zhu.chen
 * @date: 2020/12/22
 * @version: v1.0.0
 */
public class ApplicationContextInitializerTest implements ApplicationContextInitializer {

    @Override
    public void initialize(ConfigurableApplicationContext applicationContext) {
        System.out.println("ApplicationContextInitializer");
    }

}
